package top.buluoluo.ordersservice.entity;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Date;
import java.util.Map;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.Data;

import java.io.Serializable;

/**
 * 订单商品明细表(OrderItems)表实体类
 *
 * @author makejava
 * @since 2025-10-12 18:55:51
 */
@TableName(value = "order_items", autoResultMap = true)
@Data
public class OrderItems  {
//明细ID
    private Long id;
//订单ID
    private Long orderId;
//商品ID
    private Long productId;
//SKU ID
    private Long skuId;
//商品名称
    private String productName;
//商品图片
    private String imageUrl;
//SKU属性（JSON结构）
@TableField(typeHandler = JacksonTypeHandler.class)
    private Map<String, String> skuSpecs;
//商品单价
    private BigDecimal unitPrice;
//购买数量
    private Long quantity;
//小计金额
    private BigDecimal subtotal;
//创建时间
    private Date createdAt;

}

